import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
import Home from "../views/Home.vue";

const routes: Array<RouteRecordRaw> = [
  // {
  //   path: "/",
  //   name: "Home",
  //   component: Home
  // },
  {
    path: "/",
    name: "Index",
    redirect: "/home"
  },
  {
    path: "/home",
    name: "Home",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: Home
  },
  {
    path: "/smartCity",
    name: "SmartCity",

    component: () =>
      import(/* webpackChunkName: "about" */ "../views/SmartCity.vue")
  }
];

const router = createRouter({
  history: createWebHashHistory(),
  routes
});

export default router;
